﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace DiscMaster.Web.Models
{

    [MetadataType(typeof(Course_MetaData))]
    public partial class Course
    {
        public List<Forecast> Forecasts
        {
            get
            {
                return new DiscMasterRepository().GetForecasts(this.courseid.ToString());
            }
        }
    }

    internal class Course_MetaData
    {
        [ScaffoldColumn(false)]
        public System.Guid courseid { get; set; }

        [Required(ErrorMessage = "Name is required.")]
        [DisplayName("Course name")]
        public string name { get; set; }

        [Required(ErrorMessage = "Created by is required.")]
        [ScaffoldColumn(false)]
        [DisplayName("Created by")]
        public System.Guid createdby { get; set; }
    }
}
